<!DOCTYPE html>
<html>
<head>
 <include file="public:header" />
 <title>话题&标签</title>
</head>

<body>
<include file="public:logo" />
 
<div class="uu_spacing"></div>

<ytata:tagcat listname="cat"/>
<notempty name="cat">
<div class="top-menu">
  <div class="lay"></div>
		<div class="top-menu-list">
		  
		  <a  href="{:U('tag/lists')}" class="tbtn <if condition="$Think.get.cid eq ''">select</if>">全部</a>
			<volist name="cat" id="li">
			  <a class="tbtn <if condition="$Think.get.cid eq $li.id ">select </if>" href="{:U('tag/lists',array('cid'=>$li['id']))}">{$li.title}</a>
			  </volist>
  </div>
  <!--将选中的分类放置到全部后面的第一位 -->
  <script>
  var selObj = $('.top-menu-list .select');
  selObj.clone().insertAfter($(".top-menu-list").find('a').eq(0));
  selObj.remove();
  </script>
		
</div>
 </notempty>

<div class="uu_spacing"></div>

 

<div id="listData">
<include file="ajax_tag_list" />
</div>

 


<include file="public:foot" />
</body>

<script>

      var loadurl = "{:query_url('tag/ajax_tag_list',array('p'=>2))}";
      $('#listData').dropload({
          scrollArea : window,
          loadDownFn : function(me){
		  $.getJSON(loadurl, function (result) {
				  if (result.code === 0) {
					  me.lock();
					  me.noData();
					  me.resetload();
					  return;
				  }
				  else if (result.code === 1) {
						  var ret = result.data;
						  $("#listData .dropload-down").before(ret.html);
						  loadurl = ret.loadurl;
						  me.resetload();
				  }else{
					alert('Ajax Error!');
					me.resetload();
				  }
              });
          }
      });
</script>
</html>